package com.newtouch.bxzs.enterprise.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.newtouch.bxzs.common.base.model.PushCustomerRecord;
import com.newtouch.bxzs.common.base.model.bo.CompanyParameterGroupBO;
import com.newtouch.bxzs.enterprise.model.bo.CooperationUserBO;
import com.newtouch.bxzs.enterprise.model.bo.EnterpriseCustomerDetailBO;
import com.newtouch.bxzs.enterprise.model.bo.PushCustomerRecordBO;
import com.newtouch.bxzs.enterprise.model.vo.CustomerCndVO;
import com.newtouch.bxzs.enterprise.model.vo.PushCustomerRecordVO;

import java.util.List;

/**
 * 客户推送Service
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021/1/12 14:17</td>
 * <td>Amour</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author Amour
 * @version 1.0.0
 * @since 1.0.0
 */
public interface PushCustomerService {
    /**
     * 创建客户推送消息
     * @param pushCustomerRecordVO
     *          客户推送信息
     * @return String
     */
    String savePushRecord(PushCustomerRecordVO pushCustomerRecordVO);

    /**
     * 查询客户推送列表
     * @param customerCndVO
     *          客户推送查询条件
     * @return Page<PushCustomerRecordBO>
     */
    Page<PushCustomerRecordBO> getCustomerPushList(CustomerCndVO customerCndVO);

    /**
     * 根据推送记录id撤回推送信息
     * @param pushCustomerRecordId
     *          客户推送记录id
     * @return String
     */
    String revocationPush(String pushCustomerRecordId);

    /**
     * 根据推送id查询推送信息
     * @param pushCustomerRecordId
     *          客户推送id
     * @return PushCustomerRecord
     */
    PushCustomerRecord getPushRecordById(String pushCustomerRecordId);

    /**
     * 根据推送id修改推送是否接收
     * @param pushCustomerRecordId
     *          客户推送id
     * @param pushCustomerStatus 客户推送状态
     * @return boolean
     */
    boolean updatePushStatus(String pushCustomerRecordId,String pushCustomerStatus,boolean updateStatus);

    /**
     * 判断必录项
     * @param pushCustomerRecordVO 推送信息
     */
    void decidePushCustomerRecord(PushCustomerRecordVO pushCustomerRecordVO);

    /**
     * 获取接收人数据
     * @param policyNumber 保单号
     * @return CooperationUserBO 对端用户信息
     */
    CooperationUserBO getgetReceiver(String policyNumber);

    /**
     * 获取合作公司参数放入redis
     * @return boolean
     */
    List<CompanyParameterGroupBO> addRedisCompanyUrl();

    /**
     * 根据统一社会信用代码查询企业客户
     * @param unifiedSocialCreditCode 统一社会信用代
     * @return 企业客户
     */
    EnterpriseCustomerDetailBO getEnterpriseCustomerByCode(String unifiedSocialCreditCode,String userJobNumber);

}
